Page({
  onLoad:function (options) {
    console.log(options)
    // var pages = getCurrentPages()
    // var currentPage = pages[pages.length - 2].route
    // if (currentPage.indexOf('mall/index') !== -1) {
    //   wx.redirectTo({
    //     url: '../mall/index' + '?new_url=../mall/index'
    //   });
    // }
    if (typeof options.jump === 'undefined' || options.jump == 'undefined' || !options.jump) {
      wx.redirectTo({
        url: '../index/index' + '?new_url=' + options.new_url
      });
    } else {
      wx.redirectTo({
        url: options.jump + '?goods_id=' + options.goods_id + '&type=' + options.type + '&id=' + options.id +
          '&user_id=' + options.user_id + '&activity_id=' + options.activity_id + '&new_url=' + options.new_url,
      });
    };
  }
})